import http from '@/utils/axios'
export default {
  searchLayoutList(pram) {
    let ul = ''
    if (pram.name) {
      ul += `&name=${pram.name}`
    }
    return http({
      url: `/management-portal/category/page?pageNo=${pram.pageNo}&pageSize=${pram.pageSize}` + ul,
      method: 'get',
    })
  },
  saveLayoutList(pram) {
    return http({
      url: `/management-portal/category/createCategory`,
      method: 'post',
      data: pram,
    })
  },
  deletLayoutList(pram) {
    return http({
      url: `/management-portal/category/deleteCategory?id=${pram}`,
      method: 'post',
    })
  },
  updateLayoutList(pram) {
    return http({
      url: `/management-portal/category/updateCategory`,
      method: 'post',
      data: pram,
    })
  },
}
